package org.krams.tutorial.service;

import org.apache.log4j.Logger;
import org.infocorp.dao.InfocorpDAO;
import org.krams.tutorial.domain.Person;
import org.springframework.stereotype.Service;

@Service("personService")
public class PersonService {

	protected static Logger logger = Logger.getLogger("service");
	
	public PersonService() {

	}
	
	/**
	 * Retrieves a single person
	 */
	public Person get( String dni ) {
logger.debug("Retrieving person with id: " + dni);
		
		Person objPersona = null;
		InfocorpDAO objDAO = new InfocorpDAO();
		try {
			objPersona = objDAO.getDeuda(dni);
		} catch (Exception e) {
			System.err.println(e.getMessage());
		}				
		return objPersona;
	}

}
